package com.mt.mtyx.product.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.mt.mtyx.entity.product.SkuImage;
import com.mt.mtyx.product.mapper.SkuImageMapper;
import com.mt.mtyx.product.service.SkuImageService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author WMT
 * @Date 2023/7/20 22:11
 */
@Service
public class SkuImageServiceImpl extends ServiceImpl<SkuImageMapper, SkuImage> implements SkuImageService {


    @Override
    public List<SkuImage> getImagesListBySkuId(Long skuId) {
        LambdaQueryWrapper<SkuImage> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(SkuImage::getSkuId, skuId);
        return baseMapper.selectList(wrapper);
    }
}
